Spring bean's DESTROY-METHOD attribute [does not work for me]
        Posted  
        
            by EugeneP
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by EugeneP
        
        
        
        Published on 2010-05-11T10:16:52Z
        Indexed on 
            2010/05/11
            10:24 UTC
        
        
        Read the original article
        Hit count: 388
        
Can get work the attribute "destroy-method".
First, even if I type non-existing method name into "destroy-method" attribute,
Spring initialization completes fine (already strange!).
Next, when a bean has a "prototype" scope, then I suppose it must be destroyed before the application
is closed. That not happens, it is simply never called in my case.
Though, after extracting this bean I can call this method explicitly and it does its job.
Could you explain why this method is never called in my Spring 2.5 case?
p.s. The method exists, it is public and has no arguments.
© Stack Overflow or respective owner